---
title: Radio | gluestack-ui | Installation, Usage, and API

description: The Radio component presents users with predefined choices and enables them to select only one option. It is commonly used for providing a single-choice selection in forms or surveys.

pageTitle: Radio

pageDescription: The Radio component presents users with predefined choices and enables them to select only one option. It is commonly used for providing a single-choice selection in forms or surveys.

showHeader: true
---

import { Meta } from '@storybook/addon-docs';

<Meta title="ui/Components/Forms/Radio" />

import {
  Radio,
  RadioGroup,
  RadioIcon,
  RadioIndicator,
  RadioLabel,
  CircleIcon,
  Center,
} from './Radio';
import { HStack, Box, Heading } from './Radio';
import { VStack, Text, FormControl } from './Radio';
import { useState, useRef } from 'react';
import { transformedCode } from '../../../utils';
import {
  AppProvider,
  CodePreview,
  Table,
  TableContainer,
  InlineCode,
} from '@gluestack/design-system';

import Wrapper from '../../Wrapper';

This is an illustration of a **Themed Radio** component with default configuration.

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={true}
    metaData={{
      code: `
        <RadioGroup>
          <Radio value="change" {...props}>
            <RadioIndicator mr='$2'>
              <RadioIcon as={CircleIcon} strokeWidth={1}/>
            </RadioIndicator>
            <RadioLabel >Label</RadioLabel>
          </Radio>
        </RadioGroup>
      `,
      transformCode: (code) => {
        return transformedCode(code);
      },
      scope: {
        Wrapper,
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        CircleIcon,
      },
      argsType: {
        size: {
          control: 'select',
          options: ['sm', 'md', 'lg'],
          default: 'md',
        },
        isInvalid: {
          control: 'boolean',
        },
        isDisabled: {
          control: 'boolean',
        },
      },
    }}
  />
</AppProvider>

<br />

## API Reference

### Import

To use this component in your project, include the following import statement in your file.

```bash
import { Radio } from '@gluestack-ui/themed';
```

### Anatomy

The structure provided below can help you identify and understand a Radio component's various parts.

```jsx
export default () => (
  <RadioGroup>
    <Radio>
      <RadioIndicator>
        <RadioIcon />
      </RadioIndicator>
      <RadioLabel />
    </Radio>
  </RadioGroup>
);
```

### Component Props

This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.

#### Radio

Contains all Radio related layout style props and actions.
It inherits all the properties of React Native's [View](https://reactnative.dev/docs/view) component.

<AppProvider>
  <TableContainer>
    <Table>
      <Table.THead>
        <Table.TR>
          <Table.TH>
            <Table.TText>Prop</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Type</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Default</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Description</Table.TText>
          </Table.TH>
        </Table.TR>
      </Table.THead>
      <Table.TBody>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>value</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>string</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>-</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`The value to be used in the radio input. This is the value that will be returned on form submission.`}</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>onChange</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>function</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>-</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`Function called when the state of the radio changes.`}</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>isDisabled</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>bool</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>false</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`To manually set disable to the radio.`}</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>isInvalid</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>bool</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>false</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`To manually set invalid to the radio.`}</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>isHovered</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>bool</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>false</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`To manually set hover to the radio.`}</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>isFocusVisible</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>bool</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>false</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`To manually set focus visible state to the radio.`}</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>isIndeterminate</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>bool</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>false</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`To manually set indeterminate to the radio.`}</Table.TText>
          </Table.TD>
        </Table.TR>
      </Table.TBody>
    </Table>
  </TableContainer>
</AppProvider>

**Descendants Styling Props**
Props to style child components.

<AppProvider>
  <TableContainer>
    <Table>
      <Table.THead>
        <Table.TR>
          <Table.TH>
            <Table.TText>Sx Prop</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Description</Table.TText>
          </Table.TH>
        </Table.TR>
      </Table.THead>
      <Table.TBody>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>_text</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`Prop to style RadioLabel Component`}</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>_icon</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`Prop to style RadioIcon Component`}</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>_indicator</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`Prop to style RadioIndicator Component`}</Table.TText>
          </Table.TD>
        </Table.TR>
      </Table.TBody>
    </Table>
  </TableContainer>
</AppProvider>

#### RadioIndicator

Contains all Indicator related layout style props and actions. It inherits all the properties of React Native's [View](https://reactnative.dev/docs/view) component.

#### RadioIcon

Contains all Icon related layout style props and actions. It inherits all the properties of gluestack Style's [AsForwarder](/style/docs/api/as-forwarder) component.

#### RadioLabel

Contains all Label related layout style props and actions. It inherits all the properties of React Native's [Text](https://reactnative.dev/docs/text) component.

#### RadioGroup

Contains all Group related layout style props and actions. It inherits all the properties of React Native's [View](https://reactnative.dev/docs/view) component.

<AppProvider>
  <TableContainer>
    <Table>
      <Table.THead>
        <Table.TR>
          <Table.TH>
            <Table.TText>Prop</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Type</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Default</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Description</Table.TText>
          </Table.TH>
        </Table.TR>
      </Table.THead>
      <Table.TBody>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>value</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>string</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>-</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>The value of the radio group.</Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>onChange</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>function</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>-</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>
              The callback fired when any children Radio is checked or
              unchecked.
            </Table.TText>
          </Table.TD>
        </Table.TR>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>isReadOnly</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>bool</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>false</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`To manually set read-only to the radio group.`}</Table.TText>
          </Table.TD>
        </Table.TR>
      </Table.TBody>
    </Table>
  </TableContainer>
</AppProvider>

**Descendants Styling Props**
Props to style child components.

<AppProvider>
  <TableContainer>
    <Table>
      <Table.THead>
        <Table.TR>
          <Table.TH>
            <Table.TText>Sx Prop</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Description</Table.TText>
          </Table.TH>
        </Table.TR>
      </Table.THead>
      <Table.TBody>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>_radio</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>{`Prop to style Radio Component`}</Table.TText>
          </Table.TD>
        </Table.TR>
      </Table.TBody>
    </Table>
  </TableContainer>
</AppProvider>

### Features

- Keyboard support for actions.
- Support for hover, focus and active states.

### Accessibility

We have outlined the various features that ensure the Radio component is accessible to all users, including those with disabilities. These features help ensure that your application is inclusive and meets accessibility standards. Adheres to the [WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/radio/).

#### Keyboard

- `Tab`: Moves focus to the next focusable element.
- `Shift + Tab`: Moves focus to the previous focusable element.
- `Space`: To check or uncheck focused radio.

#### Screen Reader

- VoiceOver: When the radio is focused, the screen reader will announce it's a radio and it's current state (check or uncheck) and it's label.

#### Focus Management

- The `onFocus` and `onBlur` props manage focus states and provide visual cues to users. This is especially important for users who rely on keyboard navigation.

#### States

- In error state, `aria-invalid` will be passed to indicate that the radio input has an error, and providing support for an `aria-errormessage` to describe the error in more detail.
- In disabled state, `aria-hidden` will be passed to make radio input not focusable.
- In required state, `aria-required` will be passed to indicate that the radio input is required.

## Themed

The themed version of the component is a pre-styled version of the component, which allows you to quickly integrate the component into your project. The component's design and functionality are fully defined, allowing you to focus on the more important aspects of your project. To know more about Themed Library please visit this [link](https://gluestack.io/ui/docs/core-concepts/themed-library).

### Props

Radio component is created using Pressable component from react-native. It extends all the props supported by [React Native Pressable](https://reactnative.dev/docs/pressable#props), [utility props](/ui/docs/styling/utility-and-sx-props) and the props mentioned below.

#### Radio

<AppProvider>
  <TableContainer>
    <Table>
      <Table.THead>
        <Table.TR>
          <Table.TH>
            <Table.TText>Name</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Value</Table.TText>
          </Table.TH>
          <Table.TH>
            <Table.TText>Default</Table.TText>
          </Table.TH>
        </Table.TR>
      </Table.THead>
      <Table.TBody>
        <Table.TR>
          <Table.TD>
            <Table.TText>
              <InlineCode>size</InlineCode>
            </Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>lg | md | sm</Table.TText>
          </Table.TD>
          <Table.TD>
            <Table.TText>md</Table.TText>
          </Table.TD>
        </Table.TR>
      </Table.TBody>
    </Table>
  </TableContainer>
</AppProvider>

> Note: These props are exclusively applicable when utilizing the default configuration of gluestack-ui/config. If you are using a custom theme, these props may not be available.

### Examples

The Examples section provides visual representations of the different variants of the component, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.

#### Multiple Radio

Radio buttons provide a mutually exclusive selection mechanism, allowing users to choose a single option from a set of related choices.

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={false}
    metaData={{
      code: `
      function App () {
        const [values, setValues] = React.useState("Eng");
        return (
          <RadioGroup value={values} onChange={setValues}>
            <VStack space="sm">
              <Radio value="Eng" >
                <RadioIndicator mr='$2'>
                  <RadioIcon as={CircleIcon} />
                </RadioIndicator>
                <RadioLabel>English</RadioLabel>
              </Radio>
              <Radio value="Fre" >
                <RadioIndicator mr='$2'>
                  <RadioIcon as={CircleIcon} />
                </RadioIndicator>
                <RadioLabel>French</RadioLabel>
              </Radio>
              <Radio value="Ger" >
                <RadioIndicator mr='$2'>
                  <RadioIcon as={CircleIcon} />
                </RadioIndicator>
                <RadioLabel>German</RadioLabel>
              </Radio>
            </VStack>
          </RadioGroup>
        )
       }
      `,
      transformCode: (code) => {
        return transformedCode(code, 'function', 'App');
      },
      scope: {
        Wrapper,
        Center,
        VStack,
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        CircleIcon,
      },
      argsType: {},
    }}
  />
</AppProvider>

#### Horizontal

Radio buttons can be used horizontally.

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={false}
    metaData={{
      code: `
        function App() {
          const [values, setValues] = React.useState("Cash On Delivery")
          return (
            <RadioGroup value={values} onChange={setValues} >
              <HStack space="2xl">
                <Radio value="Credit Card">
                  <RadioIndicator mr='$2'>
                    <RadioIcon as={CircleIcon} />
                  </RadioIndicator>
                  <RadioLabel>Credit Card</RadioLabel>
                </Radio>
                <Radio value="Cash On Delivery">
                  <RadioIndicator mr='$2'>
                    <RadioIcon as={CircleIcon} />
                  </RadioIndicator>
                  <RadioLabel>Cash On Delivery</RadioLabel>
                </Radio>
              </HStack>
            </RadioGroup>
          )
        }
      `,
      transformCode: (code) => {
        return transformedCode(code, 'function', 'App');
      },
      scope: {
        Wrapper,
        Center,
        HStack,
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        CircleIcon,
      },
      argsType: {},
    }}
  />
</AppProvider>

#### With help text

Radio buttons can be used with helper text.

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={false}
    metaData={{
      code: `
      function App () {
          const [values, setValues] = React.useState("Read-only");
          return (
            <RadioGroup value={values} onChange={setValues}>
              <VStack space="2xl">
                <Box>
                  <Radio value="Read-only" size="md" >
                    <RadioIndicator mr='$2'>
                      <RadioIcon as={CircleIcon}/>
                    </RadioIndicator>
                    <RadioLabel>Extended coverage</RadioLabel>
                  </Radio>
                  <Text size="$sm" ml="$7" color="$textLight500">Extra services included</Text>
                </Box>
                <Box>
                  <Radio value="Write" size="md">
                    <RadioIndicator mr='$2'>
                      <RadioIcon as={CircleIcon} />
                    </RadioIndicator>
                    <RadioLabel>Basic coverage</RadioLabel>
                  </Radio>
                  <Text size="$sm" ml="$7" color="$textLight500">Nothing extra included</Text>
                </Box>
              </VStack>
            </RadioGroup>
          )
        }
      `,
      transformCode: (code) => {
        return transformedCode(code, 'function', 'App');
      },
      scope: {
        Wrapper,
        Center,
        VStack,
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        CircleIcon,
        Box,
        Text,
      },
      argsType: {},
    }}
  />
</AppProvider>

#### Form Control

Radio buttons can be used inside FormControl for better control of states and functionality.

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={false}
    metaData={{
      code: `
        <FormControl>
          <VStack space="md">
            <Heading size="sm">
              Which time slot works best for you?
            </Heading>
            <RadioGroup>
              <VStack space="sm">
                <Radio value="Monday" size="md" >
                  <RadioIndicator mr='$2'>
                    <RadioIcon as={CircleIcon} />
                  </RadioIndicator>
                  <RadioLabel>Monday</RadioLabel>
                </Radio>
                <Radio value="Tuesday" size="md">
                  <RadioIndicator mr='$2'>
                    <RadioIcon as={CircleIcon} />
                  </RadioIndicator>
                  <RadioLabel>Tuesday</RadioLabel>
                </Radio>
                <Radio value="Wednesday" size="md">
                  <RadioIndicator mr='$2'>
                    <RadioIcon as={CircleIcon} />
                  </RadioIndicator>
                  <RadioLabel>Wednesday</RadioLabel>
                </Radio>
              </VStack>
            </RadioGroup>
            <Text fontSize="$sm" color="$textLight500">
              Choose a time slot for the meeting
            </Text>
          </VStack>
        </FormControl>
      `,
      transformCode: (code) => {
        return transformedCode(code);
      },
      scope: {
        Wrapper,
        Center,
        Text,
        CircleIcon,
        VStack,
        Heading,
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        FormControl,
      },
      argsType: {},
    }}
  />
</AppProvider>

#### Label left

Radio buttons can be used horizontally

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={false}
    metaData={{
      code: `
      function App() {
        const [values, setValues] = useState("Monday");
        return (
          <RadioGroup value={values} onChange={setValues} >
            <VStack space="lg" w='$40'>
              <Radio value="Monday" justifyContent="space-between">
                <RadioLabel>Jane Cooper</RadioLabel>
                <RadioIndicator>
                  <RadioIcon as={CircleIcon} />
                </RadioIndicator>
              </Radio>
              <Radio value="Tuesday" justifyContent="space-between">
                <RadioLabel>Wade Warren</RadioLabel>
                <RadioIndicator>
                    <RadioIcon as={CircleIcon} />
                </RadioIndicator>
              </Radio>
            </VStack>
          </RadioGroup >
        )
      }
      `,
      transformCode: (code) => {
        return transformedCode(code, 'function', 'App');
      },
      scope: {
        Wrapper,
        Center,
        VStack,
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        CircleIcon,
        useState,
      },
      argsType: {},
    }}
  />
</AppProvider>

#### Controlled

The Radio components can be used with a controlled state, enabling precise management of the selected option through external state management.

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={false}
    metaData={{
      code: `
      function App () {
        const [values, setValues] = useState('Apartments');
        return (
          <RadioGroup value={values} onChange={setValues}>
            <VStack space='md'>
              <Radio value="Apartments">
                <RadioIndicator mr='$2'>
                  <RadioIcon as={CircleIcon} />
                </RadioIndicator>
                <RadioLabel>Apartments</RadioLabel>
              </Radio>
              <Radio value="Houses">
                <RadioIndicator mr='$2'>
                  <RadioIcon as={CircleIcon} />
                </RadioIndicator>
                <RadioLabel>Houses</RadioLabel>
              </Radio>
            </VStack>
          </RadioGroup>
          )
        }
      `,
      transformCode: (code) => {
        return transformedCode(code, 'function', 'App');
      },
      scope: {
        Wrapper,
        Center,
        VStack,
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        CircleIcon,
        useState,
      },
      argsType: {},
    }}
  />
</AppProvider>

#### Uncontrolled

The Radio components can be used with either a ref or no state, providing an uncontrolled state where the selected option is managed internally.

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={false}
    metaData={{
      code: `
      function App () {
        const radioRef = useRef(null);
        const handleRadioChange = (e) => {
          e.preventDefault();
          const checkboxValue = radioRef.current.checked;
        };
        return (
          <RadioGroup>
            <VStack space='md'>
              <Radio value="Hotels" ref={radioRef} onChange={handleRadioChange} >
                <RadioIndicator mr='$2'>
                  <RadioIcon as={CircleIcon} />
                </RadioIndicator>
                <RadioLabel>Hotels</RadioLabel>
              </Radio>
              <Radio value="Living quarters" ref={radioRef} onChange={handleRadioChange} >
                <RadioIndicator mr='$2'>
                  <RadioIcon as={CircleIcon} />
                </RadioIndicator>
                <RadioLabel>Living quarters</RadioLabel>
              </Radio>
            </VStack>
          </RadioGroup>
        );
      }
      `,
      transformCode: (code) => {
        return transformedCode(code, 'function', 'App');
      },
      scope: {
        Wrapper,
        Center,
        VStack,
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        CircleIcon,
        useRef,
      },
      argsType: {},
    }}
  />
</AppProvider>

#### Radio group

The Radio group component allows users to group radio and display them in a horizontal or vertical row for better visual representation and functionality.

<AppProvider>
  <CodePreview
    showComponentRenderer={true}
    showArgsController={false}
    metaData={{
      code: `
        function RadioGroupExample() {
          const [values, setValues] = useState("1st");
          return (
            <RadioGroup value={values} onChange={setValues}>
              <VStack space="sm">
                <Radio value="1st">
                  <RadioIndicator mr='$2'>
                    <RadioIcon as={CircleIcon} />
                  </RadioIndicator>
                  <RadioLabel>Label 1</RadioLabel>
                </Radio>
                <Radio value="2nd">
                  <RadioIndicator mr='$2'>
                    <RadioIcon as={CircleIcon} />
                  </RadioIndicator>
                  <RadioLabel>Label 2</RadioLabel>
                </Radio>
                <Radio value="3rd">
                  <RadioIndicator mr='$2'>
                    <RadioIcon as={CircleIcon} />
                  </RadioIndicator>
                  <RadioLabel>Label 3</RadioLabel>
                </Radio>
              </VStack>
            </RadioGroup>
          );
        };
      `,
      transformCode: (code) => {
        return transformedCode(code, 'function', 'RadioGroupExample');
      },
      scope: {
        Radio,
        RadioGroup,
        RadioIcon,
        RadioIndicator,
        RadioLabel,
        VStack,
        Wrapper,
        Center,
        CircleIcon,
        useState,
      },
      argsType: {},
    }}
  />
</AppProvider>

## Unstyled

All the components in `gluestack-ui` are unstyled by default. To customize your UI using the extendedTheme, please refer to this [link](https://gluestack.io/ui/docs/theme-configuration/customizing-theme/eject-library). The import names of components serve as keys to customize each component.

## Spec Doc

Explore the comprehensive details of the Radio in this document, including its implementation details, checklist, and potential future additions. Dive into the thought process behind the component and gain insights into its development journey.

<iframe
  style={{
    borderRadius: '8px',
    border: ' 1px solid rgba(0, 0, 0, 0.1)',
    aspectRatio: 736 / 585,
  }}
  src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Fproto%2FNcXOxqKbdnGsLQNex3H76u%2F%25C2%25A0%25F0%259F%2593%259Agluestack-UI-handbook%3Fpage-id%3D5464%253A26252%26type%3Ddesign%26node-id%3D5464-27904%26viewport%3D598%252C259%252C0.03%26t%3DcgUlx0uIsFj3bgLZ-1%26scaling%3Dcontain%26starting-point-node-id%3D5464%253A27904%26mode%3Ddesign"
  allowFullScreen
/>

<!--

### Customizing the Radio

We have a function called `createRadio` which can be used to create a custom radio component. This function takes in a configuration object which contains the styled components that you want to use for the radio. You can refer [gluestack.io/style](/style/docs/getting-started/styled) on how to use styled components.

#### Usage

Default styling of all these components can be found in the `components/core/radio` file. For reference, you can view the [source code](https://github.com/gluestack/gluestack-ui/blob/main/packages/themed/src/components/Radio) of the styled `Radio` components.

```jsx
// import the styles
import {
  Root,
  Indicator,
  Icon,
  Label,
  Group,
} from '../components/core/radio/styled-components';

// import the createRadio function
import { createRadio } from '@gluestack-ui/radio';

// Understanding the API
const Radio = createRadio({
  Root,
  Indicator,
  Icon,
  Label,
  Group,
});

// Using the radio component
export default () => (
  <RadioGroup>
    <Radio>
      <RadioIndicator>
        <RadioIcon />
      </RadioIndicator>
      <RadioLabel />
    </Radio>
  </RadioGroup>
);
```
-->
